'''
知情页面元素
'''
from config.config import DATA_PATH, LOCATOR_CONF_PATH
from utils.locate_ele import locate_element
from utils.ymal_reader import YamlReader


class ProtocolPage:

    def __init__(self, driver):
        self.element = YamlReader.yaml_reader(LOCATOR_CONF_PATH + '/agree_protocol_locator.yaml')
        self.driver = driver

    def protocolAndAgree_click(self):
        ele = self.element['PROTOCOL_AND_AGREE'].split(',')
        locate_element(self.driver, ele[0], ele[1]).click()
